<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>影院</title>
  <link type="text/css" rel="stylesheet" href="/static/css/style.css"/>
  <script src="/static/script/jquery-1.7.2.js"></script>
  <script>
    $(function (){
      var s = "全部"
      var showingFilms = "正在热映"
      $("#film_a").attr("href","/showFilms?filmState="+showingFilms+"&filmType="+s+"&zone="+s)

      var buy = document.getElementsByClassName("buy")
      for(var i=0;i<buy.length;i++) {
        buy[i].onmouseover = function () {
          this.setAttribute("style","background-color: cadetblue");
        }
        buy[i].onmouseout = function () {
          this.setAttribute("style","background-color: #b8dee7;")
        }
      }
    });
  </script>
</head>
<body>
  <!--第一行-->
  <div id="header">
  <table>
    <tr>
      <td>
        <span><img src="/static/img/logo.png" style="float: left;border-radius: 52px"></span>
        <span id="index_logo"><a href="/" style="color:red;margin-top: 10px;float: left;vertical-align: middle;">猫眼电影</a></span>
      </td>

      <td><a href="/main">首页</a></td>
      <td><a  id="film_a">电影</a></td>
      <td style="background-color: cadetblue"><a  href="/">影院</a></td>
      <td><a href="/filmList">榜单</a></td>
      <td>
        <form action="/selectFilm" method="post">
          <input class="search" type="search" placeholder="找影视剧" autocomplete="off" name="filmName"><input class="submit" type="submit" value="搜索">
        </form>
      </td>
      <td><a href="/login">
        {{if .IsLogin}}
        <img src="{{.User.ImgPath}}" style="width: 50px;border-radius: 50px;border: 2px solid darkblue">
        {{else}}
        <img src="/static/img/0.png" style="width: 50px;border-radius: 50px;border: 2px solid darkblue">
        {{end}}
      </a></td>
    </tr>
  </table>
</div>

  <div style="padding-top:5px;position: fixed;color: white;width: 1455px;height: 30px;background-color: cadetblue;top: 85px;text-align: center;">O(∩_∩)O哈哈~</div>

  <!--主体-->
  <div style="width: 1000px;margin: auto;padding: 20px;text-align: center;margin-top: 100px">
      {{range .Films}}
      <div style="float: left;margin: 40px">
        <div><img src={{.ImgPath}} style="width: 160px;height: 250px"></div>
        <span><form method="post" action="/filmPage?filmName={{.FilmName}}"><input name="subs" class="buy" type="submit" value="{{.FilmName}}"></form></span>
      </div>
      {{else}}
      ┭┮﹏┭┮，没有找到相关结果，请尝试搜索其他关键字吧~
      {{end}}
  </div>

</body>
</html>